package com.gjun.struts.resource.dao.impl;

import java.sql.SQLException;

import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.springframework.orm.hibernate3.HibernateCallback;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.gjun.struts.bean.ext.Product;
import com.gjun.struts.resource.dao.IProduct;

public class ProductDaoImpl extends HibernateDaoSupport implements IProduct {

	public void save(final Product product) {
		// TODO Auto-generated method stub
		this.getHibernateTemplate().execute(new HibernateCallback() {
			
			public Object doInHibernate(Session session) throws HibernateException,
					SQLException {
				// TODO Auto-generated method stub
				
				return session.save(product);
			}
		});
		
	}

	
}
